#ifndef __IMAGE_LIB_HPP__
#define __IMAGE_LIB_HPP__

#include <stdio.h>

const int TYPE_UNKNOWN = 0;
const int TYPE_PNG     = 1;
const int TYPE_JPG     = 2;
const int TYPE_BMP     = 3;

struct ImageInfo {
	ImageInfo () : name(0), fp(0), type(0), format(0), height(0), width(0), bpp(0), pixels_size(0), pixels(0), error(0) {};
	const char*    name;
	FILE*          fp;
	int            type;
	int            format;
	int            height;
	int            width;
	int            bpp;
	int            pixels_size;
	unsigned char* pixels;
	int            error;
};

void createImageInfo  (ImageInfo* image, const char* image_path);
void loadImage        (ImageInfo* image);
void destroyImageInfo (ImageInfo* image);
void mergeRGBA        (ImageInfo* rgb_image, ImageInfo* alpha_image);
void convertToAlpha   (ImageInfo* image);


#endif